function $(id){
	return document.getElementById(id);
}
function checkSignup() {
    var username = $("username").value;
    var password = $("password").value;
    var password1 = $("password1").value;
    var nicname = $("nicname").value;
    var phone = $("phone").value;
    var qq = $("qq").value;
    if(username.length ==0){
        $("msg").innerHTML = "账号不能为空！";
        $("username").focus();
        return false;
    }
    if(username.length>12){
     	$("msg").innerHTML = "账号不能超过12个字符！";
     	$("username").focus();
     	return false;
    }
	if(password.length ==0){
        $("msg").innerHTML = "密码不能为空！";
        $("password").focus();
        return false;
     }
     if(password.length>12){
        $("msg").innerHTML = "密码不能超过12个字符！";
        $("password").focus();
        return false;
     }
	 if(password!=password1 ){
        $("msg").innerHTML="错误！密码不一致！";
        $("password1").focus();
        return false;
     }
	 if(nicname.length ==0){
	        $("msg").innerHTML = "昵称不能为空！";
	        $("nickname").focus();
	        return false;
	 }
	 if(phone.length ==0){
	        $("msg").innerHTML = "电话不能为空！";
	        $("phone").focus();
	        return false;
	 }
        console.log("输入信息正确成功！");
        var json = {
        		instruct:"signup",
        		uname:username,
        		password:password,
        		nicname:nicname,
        		phone:phone,
        		qq:qq
        }
        goAjax(json);
        return true;
     }
